package com.hsnn.medstgmini.base.std.model;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.format.annotation.DateTimeFormat;

import com.hsnn.medstgmini.util.ParseNumber;

/**
 * 企业库详情 维护记录实体类
 * @author hss@njhsnn
 * 2015年6月10日
 */
@Entity
@Table(name = "std_compinfo_detail_log")
public class StdCompinfoDetailLog implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 8203259789664921781L;
	private String logId;//日志id
	private String compId;//企业ID
	private Double regCap;//注册资本。单位万元
	private String regCapStr;
	private String compProfile;//企业简称
	private String bizScope;//生产/营业范围
	private String legalRepName;//法人姓名
	private String legalRepIdnum;//法人身份证
	private String legalRepTelephone;//法人电话
	private String legalRepHandphone;//法人手机
	private String contactName;//联系人姓名
	private String contactIdnum;//联系人身份证号码
	private String contactPos;//联系人职务
	private String contactTelephone;//联系人电话
	private String contactHandphone;//联系人手机
	private String contactEmail;//联系人邮箱
	private String contactQq;//联系人qq
	private String bizLiceNo;//营业执照编码
	private Date bizLiceStartDate;//营业执照有效期始
	private String bizLiceStartDateStr;
	private Date bizLiceEndDate;//营业执照有效期止
	private String bizLiceEndDateStr;
	private String taxCode;//税务登记证号
	private String indusCode;//生产/经营许可证编号
	private Date indusCodeStartDate;//生产/经营许可证有效期始
	private String indusCodeStartDateStr;
	private Date indusCodeEndDate;//生产/经营许可证有效期止
	private String indusCodeEndDateStr;
	private String legalRepCertCode;//企业法人营业执照号
	private Date legalRepStartDate;//企业法人营业执照号有效期始
	private String legalRepStartDateStr;
	private Date legalRepEndDate;//企业法人营业执照号有效期止
	private String legalRepEndDateStr;
	private Date updDatetime;//更新时间
	private String updUser;//更新人
	
	private String legalRepEmail;
	private String fax;
	private String gspCode;
	private String gspAddress;
	private Date gspStartDate;
	private Date gspEndDate;
	private String gspScope;
	
	@Transient
	public String getRegCapStr() {
		if(null != regCap){
			regCapStr = ParseNumber.toStrDecimal(regCap);
		}
		return regCapStr;
	}

	public void setRegCapStr(String regCapStr) {
		this.regCapStr = regCapStr;
	}
	
	@Id
	@Column(name = "log_id", length = 36)
	public String getLogId() {
		return this.logId;
	}

	public void setLogId(String logId) {
		this.logId = logId;
	}

	@Column(name = "comp_id", nullable = false, length = 36)
	public String getCompId() {
		return this.compId;
	}

	public void setCompId(String compId) {
		this.compId = compId;
	}

	@Column(name = "reg_cap", precision = 18)
	public Double getRegCap() {
		return this.regCap;
	}

	public void setRegCap(Double regCap) {
		this.regCap = regCap;
	}

	@Column(name = "comp_profile", length = 4000)
	public String getCompProfile() {
		return this.compProfile;
	}

	public void setCompProfile(String compProfile) {
		this.compProfile = compProfile;
	}

	@Column(name = "biz_scope", length = 4000)
	public String getBizScope() {
		return this.bizScope;
	}

	public void setBizScope(String bizScope) {
		this.bizScope = bizScope;
	}

	@Column(name = "legal_rep_name", length = 20)
	public String getLegalRepName() {
		return this.legalRepName;
	}

	public void setLegalRepName(String legalRepName) {
		this.legalRepName = legalRepName;
	}

	@Column(name = "legal_rep_idnum", length = 20)
	public String getLegalRepIdnum() {
		return this.legalRepIdnum;
	}

	public void setLegalRepIdnum(String legalRepIdnum) {
		this.legalRepIdnum = legalRepIdnum;
	}

	@Column(name = "legal_rep_telephone", length = 15)
	public String getLegalRepTelephone() {
		return this.legalRepTelephone;
	}

	public void setLegalRepTelephone(String legalRepTelephone) {
		this.legalRepTelephone = legalRepTelephone;
	}

	@Column(name = "legal_rep_handphone", length = 15)
	public String getLegalRepHandphone() {
		return this.legalRepHandphone;
	}

	public void setLegalRepHandphone(String legalRepHandphone) {
		this.legalRepHandphone = legalRepHandphone;
	}

	@Column(name = "contact_name", length = 20)
	public String getContactName() {
		return this.contactName;
	}

	public void setContactName(String contactName) {
		this.contactName = contactName;
	}

	@Column(name = "contact_idnum", length = 20)
	public String getContactIdnum() {
		return this.contactIdnum;
	}

	public void setContactIdnum(String contactIdnum) {
		this.contactIdnum = contactIdnum;
	}

	@Column(name = "contact_pos", length = 64)
	public String getContactPos() {
		return this.contactPos;
	}

	public void setContactPos(String contactPos) {
		this.contactPos = contactPos;
	}

	@Column(name = "contact_telephone", length = 20)
	public String getContactTelephone() {
		return this.contactTelephone;
	}

	public void setContactTelephone(String contactTelephone) {
		this.contactTelephone = contactTelephone;
	}

	@Column(name = "contact_handphone", length = 20)
	public String getContactHandphone() {
		return this.contactHandphone;
	}

	public void setContactHandphone(String contactHandphone) {
		this.contactHandphone = contactHandphone;
	}

	@Column(name = "contact_email", length = 20)
	public String getContactEmail() {
		return this.contactEmail;
	}

	public void setContactEmail(String contactEmail) {
		this.contactEmail = contactEmail;
	}

	@Column(name = "contact_qq", length = 20)
	public String getContactQq() {
		return this.contactQq;
	}

	public void setContactQq(String contactQq) {
		this.contactQq = contactQq;
	}

	@Column(name = "biz_lice_no", length = 100)
	public String getBizLiceNo() {
		return this.bizLiceNo;
	}

	public void setBizLiceNo(String bizLiceNo) {
		this.bizLiceNo = bizLiceNo;
	}

	@Column(name = "biz_lice_start_date", length = 19)
	public Date getBizLiceStartDate() {
		return this.bizLiceStartDate;
	}

	public void setBizLiceStartDate(Date bizLiceStartDate) {
		this.bizLiceStartDate = bizLiceStartDate;
	}

	@Column(name = "biz_lice_end_date", length = 19)
	public Date getBizLiceEndDate() {
		return this.bizLiceEndDate;
	}

	public void setBizLiceEndDate(Date bizLiceEndDate) {
		this.bizLiceEndDate = bizLiceEndDate;
	}

	@Column(name = "tax_code", length = 100)
	public String getTaxCode() {
		return this.taxCode;
	}

	public void setTaxCode(String taxCode) {
		this.taxCode = taxCode;
	}

	@Column(name = "indus_code", length = 100)
	public String getIndusCode() {
		return this.indusCode;
	}

	public void setIndusCode(String indusCode) {
		this.indusCode = indusCode;
	}

	@Column(name = "indus_code_start_date", length = 19)
	public Date getIndusCodeStartDate() {
		return this.indusCodeStartDate;
	}

	public void setIndusCodeStartDate(Date indusCodeStartDate) {
		this.indusCodeStartDate = indusCodeStartDate;
	}

	@Column(name = "indus_code_end_date", length = 19)
	public Date getIndusCodeEndDate() {
		return this.indusCodeEndDate;
	}

	public void setIndusCodeEndDate(Date indusCodeEndDate) {
		this.indusCodeEndDate = indusCodeEndDate;
	}

	@Column(name = "legal_rep_cert_code", length = 100)
	public String getLegalRepCertCode() {
		return this.legalRepCertCode;
	}

	public void setLegalRepCertCode(String legalRepCertCode) {
		this.legalRepCertCode = legalRepCertCode;
	}

	@Column(name = "legal_rep_start_date", length = 19)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	public Date getLegalRepStartDate() {
		return legalRepStartDate;
	}

	public void setLegalRepStartDate(Date legalRepStartDate) {
		this.legalRepStartDate = legalRepStartDate;
	}
	
	@Transient
	public String getLegalRepStartDateStr() {
		if(legalRepStartDate != null){
			legalRepStartDateStr = new SimpleDateFormat("yyyy-MM-dd").format(legalRepStartDate);
		}
		return legalRepStartDateStr;
	}

	public void setLegalRepStartDateStr(String legalRepStartDateStr) {
		this.legalRepStartDateStr = legalRepStartDateStr;
	}

	@Column(name = "legal_rep_end_date", length = 19)
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	public Date getLegalRepEndDate() {
		return legalRepEndDate;
	}

	public void setLegalRepEndDate(Date legalRepEndDate) {
		this.legalRepEndDate = legalRepEndDate;
	}

	@Transient
	public String getLegalRepEndDateStr() {
		if(legalRepEndDate != null){
			legalRepEndDateStr = new SimpleDateFormat("yyyy-MM-dd").format(legalRepEndDate);
		}
		return legalRepEndDateStr;
	}

	public void setLegalRepEndDateStr(String legalRepEndDateStr) {
		this.legalRepEndDateStr = legalRepEndDateStr;
	}


	@Column(name = "upd_datetime", length = 19)
	public Date getUpdDatetime() {
		return this.updDatetime;
	}

	public void setUpdDatetime(Date updDatetime) {
		this.updDatetime = updDatetime;
	}

	@Column(name = "upd_user", length = 36)
	public String getUpdUser() {
		return this.updUser;
	}

	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}

	@Transient
	public String getBizLiceStartDateStr() {
		if(bizLiceStartDate != null){
			bizLiceStartDateStr = new SimpleDateFormat("yyyy-MM-dd").format(bizLiceStartDate);
		}
		return bizLiceStartDateStr;
	}

	public void setBizLiceStartDateStr(String bizLiceStartDateStr) {
			this.bizLiceStartDateStr = bizLiceStartDateStr;
	}

	@Transient
	public String getBizLiceEndDateStr() {
		if(bizLiceEndDate != null){
			bizLiceEndDateStr =  new SimpleDateFormat("yyyy-MM-dd").format(bizLiceEndDate);
		}
		return bizLiceEndDateStr;
	}

	public void setBizLiceEndDateStr(String bizLiceEndDateStr) {
			this.bizLiceEndDateStr = bizLiceEndDateStr;
		
	}

	@Transient
	public String getIndusCodeStartDateStr() {
		if(indusCodeStartDate != null){
			indusCodeStartDateStr = new SimpleDateFormat("yyyy-MM-dd").format(indusCodeStartDate);
		}
		return indusCodeStartDateStr;
	}

	public void setIndusCodeStartDateStr(String indusCodeStartDateStr) {
			this.indusCodeStartDateStr = indusCodeStartDateStr;
	}

	@Transient
	public String getIndusCodeEndDateStr() {
		if(indusCodeEndDate != null){
			indusCodeEndDateStr = new SimpleDateFormat("yyyy-MM-dd").format(indusCodeEndDate);
		}
		return indusCodeEndDateStr;
	}

	public void setIndusCodeEndDateStr(String indusCodeEndDateStr) {
			this.indusCodeEndDateStr = indusCodeEndDateStr;
		}
	@Column(name = "legal_rep_email")
	public String getLegalRepEmail() {
		return legalRepEmail;
	}

	public void setLegalRepEmail(String legalRepEmail) {
		this.legalRepEmail = legalRepEmail;
	}
	@Column(name = "fax")
	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}
	@Column(name = "gsp_code")
	public String getGspCode() {
		return gspCode;
	}

	public void setGspCode(String gspCode) {
		this.gspCode = gspCode;
	}
	@Column(name = "gsp_address")
	public String getGspAddress() {
		return gspAddress;
	}

	public void setGspAddress(String gspAddress) {
		this.gspAddress = gspAddress;
	}
	@Column(name = "gsp_start_date")
	public Date getGspStartDate() {
		return gspStartDate;
	}
	
	public void setGspStartDate(Date gspStartDate) {
		this.gspStartDate = gspStartDate;
	}
	@Column(name = "gsp_end_date")
	public Date getGspEndDate() {
		return gspEndDate;
	}

	public void setGspEndDate(Date gspEndDate) {
		this.gspEndDate = gspEndDate;
	}
	@Column(name = "gsp_scope")
	public String getGspScope() {
		return gspScope;
	}

	public void setGspScope(String gspScope) {
		this.gspScope = gspScope;
	}
}